<extend name="base/Base" />
<block name="Style">
<!-- FooTable Plugin CSS -->
		<link rel="stylesheet" type="text/css" href="__ABSOLUTEADMIN__/vendor/plugins/footable/css/footable.core.min.css">
		<!-- Admin Forms CSS -->
		<link rel="stylesheet" type="text/css" href="__ABSOLUTEADMIN__/assets/admin-tools/admin-forms/css/admin-forms.css">
		
		<js href="__ADDON__/ueditor/js/jquery-1.11.0.min.js" />
		<js href="__ADDON__/ueditor/cms.admin.config.js" />    
		<js href="__ADDON__/ueditor/ueditor.all.min.js" />
		<link rel="stylesheet" href="/public/addon/style/css/bootstrap-select.css">
		<script src="/public/addon/style/js/bootstrap-select.min.js"></script>
		<script>
		$(function(){
			var url="__APP__/Home/Ueditor/Index/Addon/Ueditor.html";
			var ue = UE.getEditor('container',{
				serverUrl :url,
				UEDITOR_HOME_URL:'__ADDON__/ueditor/',
			});
			ue.ready(function(){
				ue.execCommand('serverparam', {
					'uid': "<?php echo getUID(); ?>",
				   'username': '<?php echo getUID(); ?>',
				});
			});

		})
		</script>
	
		<js href="__ADDON__/ajaxupload/js/jquery.js" />
		<js href="__ADDON__/ajaxupload/js/ajaxupload.js" />
		<script type="text/javascript">
		$(function(){
			var button = $('#upload_button'), interval;
			var confirmdiv = $('#uploadphotoconfirm');
			var fileType = "pic",fileNum = "one"; 
			
			var icon = $(".icon"),song = $(".song"),fal = false;
			var del = $(".del");
			
			Discoloration(song);
			//点击展开
			icon.on("click",function(e){
				var ele = e.target;
				fal = !fal;
				if(fal){
					$(ele).parent(".song").css("height","250px");
				}else{
					$(ele).parent(".song").css("height","50px");
				}
			})
			
			//删除
			del.on("click",function(e){
				var ele = e.target;
				$(ele).parent(".song").remove();
			})
			
			//隔行变色 
			function Discoloration(arr){
				for(var i=0;i<arr.length;i++){
					if (i % 2) {
						arr[i].style.background = '#fff';
					}
					else {
						arr[i].style.background = '#ccc';
					}
				}
			}
			
			
			new AjaxUpload(button,{
				action: "__APP__/Home/Upload/Image/Addon/AjaxUpload.html",
				name: 'userfile',
				onSubmit : function(file, ext){
					if(fileType == "pic")
					{
						if (ext && /^(jpg|png|jpeg|gif|JPG)$/.test(ext)){
							this.setData({
								'info': '文件类型为图片'
							});
						} else {
							 confirmdiv.text('文件格式错误，请上传格式为.png .jpg .jpeg 的图片');
							return false;               
						}
					}
								
					confirmdiv.text('文件上传中');
					
					if(fileNum == 'one')
						this.disable();
					
					interval = window.setInterval(function(){
						var text = confirmdiv.text();
						if (text.length < 14){
							confirmdiv.text(text + '.');                    
						} else {
							confirmdiv.text('文件上传中');             
						}
					}, 200);
				},
				onComplete: function(file, response){
					if(response != "success"){
						if(response =='2'){
							confirmdiv.text("文件格式错误，请上传格式为.png .jpg .jpeg 的图片");
						}else{
							
							confirmdiv.text("上传完成");
							
							$("#newbikephotoName").val(response);
							$("#newbikephoto").attr("src",response);	
							$("#imgurl").attr("value",response);						
							
						}
						
					}
										  
					window.clearInterval(interval);
								
					this.enable();
					
					if(response == "success")
					alert('上传成功');              
				}
			});
		});
		$(function(){
			var button = $('#upload_button1'), interval;
			var confirmdiv = $('#uploadphotoconfirm1');
			var fileType = "pic",fileNum = "one"; 
			new AjaxUpload(button,{
				action: "__APP__/Home/Upload/Image/Addon/AjaxUpload.html",
				name: 'userfile',
				onSubmit : function(file, ext){
					if(fileType == "pic")
					{
						if (ext && /^(jpg|png|jpeg|gif|JPG)$/.test(ext)){
							this.setData({
								'info': '文件类型为图片'
							});
						} else {
							 confirmdiv.text('文件格式错误，请上传格式为.png .jpg .jpeg 的图片');
							return false;               
						}
					}
								
					confirmdiv.text('文件上传中');
					
					if(fileNum == 'one')
						this.disable();
					
					interval = window.setInterval(function(){
						var text = confirmdiv.text();
						if (text.length < 14){
							confirmdiv.text(text + '.');                    
						} else {
							confirmdiv.text('文件上传中');             
						}
					}, 200);
				},
				onComplete: function(file, response){
					if(response != "success"){
						if(response =='2'){
							confirmdiv.text("文件格式错误，请上传格式为.png .jpg .jpeg 的图片");
						}else{
							
							confirmdiv.text("上传完成");
							
							$("#newbikephotoName1").val(response);
							$("#newbikephoto1").attr("src",response);	
							$("#imgurl1").attr("value",response);						
							
						}
						
					}
										  
					window.clearInterval(interval);
								
					this.enable();
					
					if(response == "success")
					alert('上传成功');              
				}
			});
		});
		
		$(function(){
			var button = $('#upload_button2'), interval;
			var confirmdiv = $('#uploadphotoconfirm2');
			var fileType = "pic",fileNum = "one"; 
			new AjaxUpload(button,{
				action: "__APP__/Home/Upload/Image/Addon/AjaxUpload.html",
				name: 'userfile',
				onSubmit : function(file, ext){
					if(fileType == "pic")
					{
						if (ext && /^(jpg|png|jpeg|gif|JPG)$/.test(ext)){
							this.setData({
								'info': '文件类型为图片'
							});
						} else {
							 confirmdiv.text('文件格式错误，请上传格式为.png .jpg .jpeg 的图片');
							return false;               
						}
					}
								
					confirmdiv.text('文件上传中');
					
					if(fileNum == 'one')
						this.disable();
					
					interval = window.setInterval(function(){
						var text = confirmdiv.text();
						if (text.length < 14){
							confirmdiv.text(text + '.');                    
						} else {
							confirmdiv.text('文件上传中');             
						}
					}, 200);
				},
				onComplete: function(file, response){
					if(response != "success"){
						if(response =='2'){
							confirmdiv.text("文件格式错误，请上传格式为.png .jpg .jpeg 的图片");
						}else{
							
							confirmdiv.text("上传完成");
							
							$("#newbikephotoName2").val(response);
							$("#newbikephoto2").attr("src",response);	
							$("#imgurl2").attr("value",response);						
							
						}
						
					}
										  
					window.clearInterval(interval);
								
					this.enable();
					
					if(response == "success")
					alert('上传成功');              
				}
			});
		});
		
		
		$(function(){
			var button = $('#upload_button3'), interval;
			var confirmdiv = $('#uploadphotoconfirm3');
			var fileType = "pic",fileNum = "one"; 
			new AjaxUpload(button,{
				action: "__APP__/Home/Upload/Image/Addon/AjaxUpload.html",
				name: 'userfile',
				onSubmit : function(file, ext){
					if(fileType == "pic")
					{
						if (ext && /^(jpg|png|jpeg|gif|JPG)$/.test(ext)){
							this.setData({
								'info': '文件类型为图片'
							});
						} else {
							 confirmdiv.text('文件格式错误，请上传格式为.png .jpg .jpeg 的图片');
							return false;               
						}
					}
								
					confirmdiv.text('文件上传中');
					
					if(fileNum == 'one')
						this.disable();
					
					interval = window.setInterval(function(){
						var text = confirmdiv.text();
						if (text.length < 14){
							confirmdiv.text(text + '.');                    
						} else {
							confirmdiv.text('文件上传中');             
						}
					}, 200);
				},
				onComplete: function(file, response){
					if(response != "success"){
						if(response =='2'){
							confirmdiv.text("文件格式错误，请上传格式为.png .jpg .jpeg 的图片");
						}else{
							
							confirmdiv.text("上传完成");
							
							$("#newbikephotoName3").val(response);
							$("#newbikephoto3").attr("src",response);	
							$("#imgurl3").attr("value",response);						
							
						}
						
					}
										  
					window.clearInterval(interval);
								
					this.enable();
					
					if(response == "success")
					alert('上传成功');              
				}
			});
		});
		
		$(function(){
			var button = $('#upload_button4'), interval;
			var confirmdiv = $('#uploadphotoconfirm4');
			var fileType = "pic",fileNum = "one"; 
			new AjaxUpload(button,{
				action: "__APP__/Home/Upload/Image/Addon/AjaxUpload.html",
				name: 'userfile',
				onSubmit : function(file, ext){
					if(fileType == "pic")
					{
						if (ext && /^(jpg|png|jpeg|gif|JPG)$/.test(ext)){
							this.setData({
								'info': '文件类型为图片'
							});
						} else {
							 confirmdiv.text('文件格式错误，请上传格式为.png .jpg .jpeg 的图片');
							return false;               
						}
					}
								
					confirmdiv.text('文件上传中');
					
					if(fileNum == 'one')
						this.disable();
					
					interval = window.setInterval(function(){
						var text = confirmdiv.text();
						if (text.length < 14){
							confirmdiv.text(text + '.');                    
						} else {
							confirmdiv.text('文件上传中');             
						}
					}, 200);
				},
				onComplete: function(file, response){
					if(response != "success"){
						if(response =='2'){
							confirmdiv.text("文件格式错误，请上传格式为.png .jpg .jpeg 的图片");
						}else{
							
							confirmdiv.text("上传完成");
							
							$("#newbikephotoName4").val(response);
							$("#newbikephoto4").attr("src",response);	
							$("#imgurl4").attr("value",response);						
							
						}
						
					}
										  
					window.clearInterval(interval);
								
					this.enable();
					
					if(response == "success")
					alert('上传成功');              
				}
			});
		});
		$(function(){
			var button = $('#upload_button5'), interval;
			var confirmdiv = $('#uploadphotoconfirm5');
			var fileType = "pic",fileNum = "one"; 
			new AjaxUpload(button,{
				action: "__APP__/Home/Upload/Image/Addon/AjaxUpload.html",
				name: 'userfile',
				onSubmit : function(file, ext){
					if(fileType == "pic")
					{
						if (ext && /^(jpg|png|jpeg|gif|JPG)$/.test(ext)){
							this.setData({
								'info': '文件类型为图片'
							});
						} else {
							 confirmdiv.text('文件格式错误，请上传格式为.png .jpg .jpeg 的图片');
							return false;               
						}
					}
								
					confirmdiv.text('文件上传中');
					
					if(fileNum == 'one')
						this.disable();
					
					interval = window.setInterval(function(){
						var text = confirmdiv.text();
						if (text.length < 14){
							confirmdiv.text(text + '.');                    
						} else {
							confirmdiv.text('文件上传中');             
						}
					}, 200);
				},
				onComplete: function(file, response){
					if(response != "success"){
						if(response =='2'){
							confirmdiv.text("文件格式错误，请上传格式为.png .jpg .jpeg 的图片");
						}else{
							
							confirmdiv.text("上传完成");
							
							$("#newbikephotoName5").val(response);
							$("#newbikephoto5").attr("src",response);	
							$("#imgurl5").attr("value",response);						
							
						}
						
					}
										  
					window.clearInterval(interval);
								
					this.enable();
					
					if(response == "success")
					alert('上传成功');              
				}
			});
		});
		
		</script>
		
		<style type="text/css">
			.song .details{
				padding:2vw 3vw;
			}
			.song .details p{
				float:left;
				margin-right:3vw;
			}
			.song .details p span{
				display:inline-block;
				width:80px;
				text-align:right;
			}
			.song .details p input{
				height:30px;
				border-radius:5px;
				text-indent:3px;
			}
			.song .del:hover{
				color:#f00;
			}
		</style>

</block>
<block name="Topbar">
				
<header id="topbar" class="ph10">
        <div class="topbar-left">
          <ul class="nav nav-list nav-list-topbar pull-left">
           
			<li  class="active">
              <a href="__APP__/Mall/Classify/Create_album.html"    >新增专辑</a>
            </li>
			<!-- <li>
              <a  href="__APP__/Mall/Classify/Album.html"   >专辑管理</a>
            </li> -->
          </ul>
        </div>
	</header>				
 <!-- Start: Topbar -->
     <!--  <header id="topbar" class="ph10">
        <div class="topbar-left">
         <ul class="nav nav-list nav-list-topbar pull-left">
           
			<li   class="" >
              <a href="__APP__/Mall/Page/music_create.html"    >新增单曲</a>
            </li>
			<li     >
              <a  href="__APP__/Mall/Page/album_song.html"   >单曲管理</a>
            </li>
			
           
          </ul>
        </div>
      
      </header> -->
	  						
    				
</block>
<block name="Content">

<!-- START ROW -->

	<div class="row">

		<!-- NEW COL START -->
		<article class="col-md-offset-1 col-sm-12 col-md-12 col-lg-10">
			
			<!-- Widget ID (each widget will need unique ID)-->
			<div class="jarviswidget" id="wid-id-7" data-widget-editbutton="false" data-widget-custombutton="false">
				
				<div>
					
					<!-- widget edit box -->
					<div class="jarviswidget-editbox">
						<!-- This area used as dropdown edit box -->
						
					</div>
					<!-- end widget edit box -->
					
					<!-- widget content -->
					<div class="widget-body no-padding">
						
						<form id="smart-form-register" action="__APP__/Mall/Classify/create_album.html" onsubmit="return tijiao()" enctype="multipart/form-data" method="post" class="smart-form">
							
							<div class="form-group col-md-6">
								<label for="exampleInputEmail1">请选择语言</label>
								<select class="form-control" name="langue">
									<volist name="langeue_list" id="langeue_list">
									<option value ="{$langeue_list.id}" >|--  {$langeue_list.name}</option>
									</volist>
								</select>
							  </div>
							<div class="form-group col-md-6">
								<label for="exampleInputEmail1">请选择流派风格</label>
								<select id="style" name="style[]" class="selectpicker show-tick form-control" multiple data-live-search="false">
									<volist name="type_list" id="type_list">
									<option value ="{$type_list.id}">{$type_list.name}</option>
									</volist>
								</select>
							  </div>
							 <div class="row">
								 <div class="col-md-4">
									 <div class="form-group">
										<label for="exampleInputEmail1">请输入专辑名称</label>
										<input type="text"  name="name" id="name" class="form-control"  placeholder="请输入专辑名称" value="{$data.name}">
									  </div>
								  </div>
								 <div class="col-md-4">
									 <div class="form-group">
										<label for="exampleInputEmail1">请输入专辑唯一编码</label>
										<input type="text"  name="isrc" id="isrc" class="form-control"  placeholder="请输入专辑唯一编码" value="{$data.isrc}">
									  </div>
								  </div>
								  
								  <div class="col-md-4">
									   <div class="form-group">
										<label for="exampleInputEmail1">请输入歌手</label>
										<input type="text"  name="singer" id="singer" class="form-control"  placeholder="请输入歌手" value="{$data.singer}">
									  </div>
								  </div>
								 
								  <div class="col-md-4">
									   <div class="form-group">
										<label for="exampleInputEmail1">请输入出售单价</label>
										<input type="text"  name="money" id="money" class="form-control"  placeholder="请输入出售单价" value="{$data.money}">
									  </div>
								  </div>
								  
								   <div class="col-md-4">
									   <div class="form-group">
										<label for="exampleInputEmail1">请输入发行量</label>
										<input type="text"  name="inventory" id="inventory" class="form-control"  placeholder="请输入发行量" value="{$data.inventory}">
									  </div>
								  </div>
								  
								   <div class="col-md-4">
								  <div class="form-group">
								<label for="exampleInputEmail1">请选择发行时间</label>
								<input style="height:45px;" name="release_time" placeholder="请输入日期" value="{$time|date='Y-m-d',###}" class="form-control laydate-icon gui-input" onclick="laydate()">
								</div>
								</div>
							  </div>
							<div class="col-md-3">
							   <section>
						<label class="control-label" for="bike_type">&nbsp;</label>
							<input type="file" style="display:none" name="userfile">
							<input type="hidden" id="newbikephotoName" name="img" value="" />
							<input type="hidden" id="oldbikephotoName" value="" />
							<div class="controls" style="text-align:center;">
								<img  id="newbikephoto" src="http://image.zaiyoudao.com/image.php/zyd_126.html" style="max-height:200px;max-width:200px;" />
								<span class="help-inline"></span>
								<br>
								<div id="uploadphotoconfirm"></div>
								<br>
								<input type="hidden" name="img" id="imgurl" value="" style="max-height:200px;max-width:200px;"  >
								<input type="button" class="btn btn-lg btn-primary" style="width:50%" id="upload_button"  value="上传封面" /><br/>
							</div>
							</section>
							 </div>
							 
							  <div class="col-md-3">
							   <section>
						<label class="control-label" for="bike_type">&nbsp;</label>
							<input type="file" style="display:none" name="userfile">
							<input type="hidden" id="newbikephotoName1" name="bottom_img" value="" />
							<input type="hidden" id="oldbikephotoName1" value="" />
							<div class="controls" style="text-align:center;">
								<img  id="newbikephoto1" src="http://image.zaiyoudao.com/image.php/zyd_126.html" style="max-height:200px;max-width:200px;" />
								<span class="help-inline"></span>
								<br>
								<div id="uploadphotoconfirm1"></div>
								<br>
								<input type="hidden" name="bottom_img" id="imgurl1" value="" style="max-height:200px;max-width:200px;"  >
								<input type="button" class="btn btn-lg btn-primary" style="width:50%" id="upload_button1"  value="上传封底" /><br/>
								
							</div>
							</section>
							</div>
							
							 <div class="col-md-3">
							   <section>
						<label class="control-label" for="bike_type">&nbsp;</label>
							<input type="file" style="display:none" name="userfile">
							<input type="hidden" id="newbikephotoName2" name="banner_img" value="" />
							<input type="hidden" id="oldbikephotoName2" value="" />
							<div class="controls" style="text-align:center;">
								<img  id="newbikephoto2" src="http://image.zaiyoudao.com/image.php/zyd_126.html" style="max-height:200px;max-width:200px;" />
								<span class="help-inline"></span>
								<br>
								<div id="uploadphotoconfirm2"></div>
								<br>
								<input type="hidden" name="banner_img" id="imgurl2" value="" style="max-height:200px;max-width:200px;"  >
								<input type="button" class="btn btn-lg btn-primary" style="width:50%" id="upload_button2"  value="上传banner图" /><br/>
							</div>
							</section>
							</div>
							<div class="col-md-3">
								<div class='controls' style='text-align:center;'>
									<br/>
									<div style='height:40px;margin:auto;line-height:40px;' id="fileView"></div>
									<br/>
									<input type="button" class="btn btn-lg btn-primary" style="width:50%" id="btn1"  value="上传内页" /><br/>
									<input id="color_img" type="file" multiple="multiple" name="color_img[]" style='display:none'/>
								</div>
							</div>
							<!-- <br/><br/><br/><br/>
							<br/><br/><br/><br/> -->
							<script>
								btn1.onclick = function(){
									var ie=navigator.appName=="Microsoft Internet Explorer" ? true : false; 
								　　if(ie){ 
								　　　　document.getElementById("file").click(); 
								　　}else{
								　　　　var a=document.createEvent("MouseEvents");//FF的处理 
								　　　　a.initEvent("click", true, true);  
								　　　　color_img.dispatchEvent(a); 
								　　} 
								
								color_img.onchange = function(){
									if(this.files[0]){
										fileView.innerHTML = '已选'+this.files.length+'个图片'
									}
								}
								}
								
								btn2.onclick = function(){
									var ie=navigator.appName=="Microsoft Internet Explorer" ? true : false; 
								　　if(ie){ 
								　　　　document.getElementById("file").click(); 
								　　}else{
								　　　　var a=document.createEvent("MouseEvents");//FF的处理 
								　　　　a.initEvent("click", true, true);  
								　　　　foil_img.dispatchEvent(a); 
								　　} 
								
								foil_img.onchange = function(){
									if(this.files[0]){
										fileView1.innerHTML = '已选'+this.files.length+'个图片'
									}
								}
								}
							</script>
						
							<div class="form-group">
								<label for="exampleInputEmail1" style="display:none;">请输入专辑介绍</label>
								<textarea class="form-control" rows="3" name="intro" value="{$data.intro}" placeholder="请输入专辑介绍"></textarea>
							</div>
							<br>
							<br>
							<footer style='position:relative;'>
							<style>
								*{
								margin:0;
								padding:0;
								}
								.mbt{
									margin:5px 0;
								}
								.bck{
								 background-image:url('/public/addon/style/img/timg.jpg');background-size:100%;
								 }
							</style>
								<div id="songList" style="margin-bottom:10px;"></div>
								<div title="选择歌曲" style="vertical-align:middle; overflow:hidden; width:auto;display:inline-block;position:relative;border:2px solid #000; padding:3px 16px; margin-bottom:2vh;color:#000;">
									<span  style='font-size:16px;'>+ 选择文件</span>
									<input id="file" type="file" multiple="multiple" name="music_song[]"  style="height:100%;width:100%;position:absolute;top:0;left:0;opacity:0;"/>
								</div>
								<button type="submit" class="btn btn-primary" style="width:100%;">
									发布专辑
								</button>
							</footer>
<script type="text/javascript">
	var	num = 0 ;
	var songInfo = '' ;
	var del = undefined;
	var toggle = undefined;
	var bar ;
	var lyric;
	var chendi;
	var data;
	file.onchange = function(e){
		//添加文件
		if(file.files.length>0){
			for( var i = 0;i<file.files.length;i++){
			bar = file.files[i].name
			if(bar.length>10){
				bar = bar.slice(0,11)+'...';
			}
			songInfo = `<li style="list-style:none;overflow:hidden">
							<div class='form-inline' style='height:20px;position:relative'>
								<span class='item form-group' style='width:20px;height:20px;float:left;background: url(https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1524907023669&di=4f1451c653c70d6d01e402addcab9b4e&imgtype=0&src=http%3A%2F%2Fimgsrc.baidu.com%2Fimgad%2Fpic%2Fitem%2F91529822720e0cf3e3857ad00146f21fbe09aaae.jpg) no-repeat;background-size: 100%;'></span><span style='position:absolute;left:30%;' title ="+file.files[i].name+" class='form-group'>`+bar+`</span>&nbsp<span style='position:absolute;left:60%;'>`+(file.files[i].size/1024/1024).toFixed(2)+`MB</span><span class='del' style='float:right;cursor:pointer;'>删除</span>
								<input type='hidden' class='urlBox' name='mp3[]' value=''/>
							</div>
								<!-- 字符串内容 -->
							<div class='col-md-4' style="display:none">
								<div class='form-group'>
								<label>请输入单曲名称</label>
								<input type='text' class='form-control'  placeholder='请输入单曲名称' name="music_name[]" value=''>
							  </div>
							</div>
							  
							  <div class="col-md-4" style="display:none">
							  <div class="form-group">
								<label for="exampleInputEmail1">请选择语言</label>
								<select class="form-control" name="langues[]">
									{$langeue_str}
								</select>
							  </div>
							   </div>
							  <!--  <div class="col-md-4" style="display:none">
							  <div class="form-group">
								<label for="exampleInputEmail1">请选择流派风格</label>
								 <select id="style" name="style[]" class="selectpicker show-tick form-control" multiple data-live-search="false">
									
									<option value ='1'>2</option>
									
								</select>
								<button type="button" class=" form-control btn dropdown-toggle bs-placeholder btn-default" data-toggle="dropdown" role="button" data-id="style" title="Nothing selected" aria-expanded="false"><span class="filter-option pull-left">Nothing selected</span>&nbsp;<span class="bs-caret"><span class="caret"></span></span></button>
							  </div>
							   </div>	 -->  
							  <br/>
							   <div class="col-md-4" style="display:none">
							  <div class="form-group">
								<label>请输入作词</label>
								<input type="text" class="form-control"  placeholder="请输入作词" name="lyrics[]"/>
							  </div>
							  </div>
							  
							   <div class="col-md-4" style="display:none">
							  <div class="form-group">
								<label>请输入作曲</label>
								<input type="text" class="form-control"  placeholder="请输入作曲" name="composes[]"/>
							  </div>
							  </div>
							   <div class="col-md-4" style="display:none">
							  <div class="form-group">
								<label>请输入录音</label>
								<input type="text" class="form-control"  placeholder="请输入录音" name="records[]"/>
							  </div>
							  </div>
							   <div class="col-md-4" style="display:none">
							  <div class="form-group">
								<label>请输入混音</label>
								<input type="text" class="form-control"  placeholder="请输入混音" name="mixings[]"/>
							  </div>
							  </div>
							   <div class="col-md-4" style="display:none">
							  <div class="form-group">
								<label>请输入演唱者</label>
								<input type="text" class="form-control"  placeholder="请输入演唱者" name="singers[]"/>
							  </div>
							  </div>
							   <div class="col-md-4" style="display:none">
							  <div class="form-group">
								<label>请输入制作人</label>
								<input type="text" class="form-control"  placeholder="请输入制作人" name="producer[]"/>
							  </div>
							  </div>
							   <div class="col-md-4" style="display:none">
							  <div class="form-group">
								<label>请输入出品方</label>
								<input type="text" class="form-control"  placeholder="请输入出品方" name="producers[]"/>
							  </div>
							  </div>
							   <div class="col-md-4" style="display:none">
							  <div class="form-group">
								<label>上传歌词</label>
								<div class='bck' style='width:39px;height:39px;border:1px solid #ccc;cursor:pointer;overflow:hidden;border-radius:3px;' >
								<!-- /public/addon/style/img/time.jpg -->
									<input type="file"  class="lyric" style='height:100%;opacity:0;' name="music_lyrics[]"/>
									<input type = "hidden" class='' value = ''/> 
								</div>
								<span style='position:absolute;left:90px;top:25px;height:30px;width:200px;line-height:30px;'></span>
							  </div>
							  </div>
							   <div class="col-md-4" style="display:none">
							  <div class="form-group" id='formcd'>
								<label>上传歌词本底衬页</label>
								<div class='bck'   style='width:39px;height:39px;border:1px solid #ccc;cursor:pointer;overflow:hidden;border-radius:3px;' >
								<input type="file" class="chendi" style='height:100%;opacity:0;' name="foil_img[]" multiple />
								</div>
								<span style='position:absolute;left:90px;top:25px;height:30px;width:200px;line-height:30px;'></span>
								<input type="hidden" name="music_img_count[]" value=""/>
							  </div>
							  </div>
							  <div class="col-md-4" style="display:none">
							  <div class="form-group" id='formcd'>
								<label>上传宣传图</label>
								<div  class='bck'  style='width:39px;height:39px;border:1px solid #ccc;cursor:pointer;overflow:hidden;border-radius:3px;' >
								<input type="file" class="chendi" style='height:100%;opacity:0;' name="xuanchuan_img[]" multiple />
								</div>
								<span style='position:absolute;left:90px;top:25px;height:30px;width:200px;line-height:30px;'></span>
								<input type="hidden" name="xuanchuan_img_count[]" value=""/>
							  </div>
							  </div>
						</li>`
			songList.innerHTML+=songInfo;
			
               
			}
			var data = new FormData();
                //为FormData对象添加数据
                $.each(file.files, function(i, file) {
                    data.append('upload_file'+i, file);
                });
				xhr = new XMLHttpRequest();
			xhr.onreadystatechange= function(){
		if(xhr.readyState==4){
			if(xhr.status==200){
				res = JSON.parse(xhr.responseText);
				var urlBox = document.getElementsByClassName('urlBox');
				console.log(res)
				for(i in res){
					//console.log(res[i])
					urlBox[num].value = res[i].url;
					console.log(res[i].url)
					//console.log(urlBox[i])
					//console.log(urlBox[i].value)
					num++
				}
			}
		}
	}
		xhr.open('post','__APP__/Mall/Classify/ajax_shangchuan',true)
		xhr.send(data)
		}
			//删除按钮操作ul移除li
			del = document.getElementsByClassName('del')
			for(i in del){
				del[i].onclick = function(e){
					this.parentNode.parentNode.parentNode.removeChild(this.parentNode.parentNode)
				}
			}
			//歌词
			lyric = document.getElementsByClassName('lyric')
			for(i in lyric){
					lyric[i].onchange = function(){
					if(this.files[0]){
						console.log(this.files[0])
						this.parentNode.nextSibling.nextSibling.innerHTML = this.files[0].name;
						var data = new FormData();
						data.append('file',this.files[0])
						var xhr = new XMLHttpRequest();
						xhr.onreadystatechange=function(){
							if(xhr.readyState==4){
								if(xhr.status==200){
									console.log('数据请求成功')
									console.log(xhr.response)
								}
							}
						}
						xhr.open('post','__APP__/Mall/Classify/ajax_shangchuan',true);
						xhr.send(data);
					}
				}
			}
			//衬底
			chendi = document.getElementsByClassName('chendi');
			
			for(i in chendi){
					chendi[i].onchange = function(){
					if(this.files[0]){
						this.parentNode.nextSibling.nextSibling.innerHTML = '已选'+this.files.length+'个图片'
						this.parentNode.nextSibling.nextSibling.nextSibling.nextSibling.value = this.files.length;
						var formcd = document.getElementById('formcd')
							var data = new FormData(formcd);
							var xhr = new XMLHttpRequest();
							xhr.onreadystatechange=function(){
								if(xhr.readyState==4){
									if(xhr.status==200){
										console.log('数据请求成功')
										console.log(xhr.response)
									}
								}
							}
							xhr.open('post','__APP__/Mall/Classify/ajax_shangchuan',true);
							xhr.send(data);
						
					}
				}
			}
	
			//详细信息展示
			toggle = document.getElementsByClassName('item')
			for(var n in toggle){
				toggle[n].onclick = function(){
						var el = sibling(this.parentNode)
						for(j in el){
							el[j].style.display =='block'?el[j].style.display = 'none':el[j].style.display = 'block';
						}
					}
			}
	}

	//获取兄弟元素
	function sibling( elem ) {
		var r = [];
		var n = elem.parentNode.firstChild;
		for ( ; n; n = n.nextSibling ) {
			if ( n.nodeType === 1 && n !== elem ) {
				r.push( n );
			}
		}
		return r;
	}
</script>
						</form>						
						
					</div>
					<!-- end widget content -->
					
				</div>
				<!-- end widget div -->
				
			</div>
			<!-- end widget -->	

		</article>
		<!-- END COL -->

		
	<br>
	<br>
	</div>

	<!-- END ROW -->
	
</block>
<block name="Script">
	
  <!-- FooTable Plugin -->
  <script src="__ABSOLUTEADMIN__/vendor/plugins/footable/js/footable.all.min.js"></script>
   <!-- FooTable Addon -->
  <script src="__ABSOLUTEADMIN__/vendor/plugins/footable/js/footable.filter.min.js"></script>

						<script>
						
							//新增配置
							//新增配置
							function change(){  
							
								var username = $("#username").val();
								var nickname = $("#nickname").val();
								
								var tel = $("#tel").val();
								var email = $("#email").val();
								var img = $("#newbikephotoName").val();
								
								$.ajax({
									type:'POST',
									url:"__APP__/Admin/User/Create.html",
									data:{
										
										"username": username,
										"nickname": nickname,
										"tel": tel,
										"email": email,
										"img": img,
										
										
									},
									success:function(data){			
										var info = eval(data)
										if (info.errcode == 0) {
										
											layer.msg(info.errmsg);
											setTimeout(window.location.reload(),3000);
											
										}else{
											layer.msg(info.errmsg);
										}
									},
									error:function(){
										layer.msg('系统繁忙,请稍候重试！');
									}
								
								});	 
							}  
							
							function tijiao(){
								var style = $("#style").val();
								var isrc = $("#isrc").val();
								if(style == null){
									layer.msg("请选择风格");
									return false;
								}
								if(isrc == ''){
									layer.msg("请输入专辑唯一编码");
									return false;
								}
								
							}
							
							</script>
 <script type="text/javascript">
  jQuery(document).ready(function() {

 

    // Init FooTable Examples
    $('.footable').footable();


  });
  </script>
</block>